/**
  ******************************************************************************
  * @file    Project/STM32L1xx_StdPeriph_Template/main.h 
  * @author  MCD Application Team
  * @version V1.0.0
  * @date    31-December-2010
  * @brief   Header for main.c module
  ******************************************************************************
  * @attention
  *
  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  *
  * <h2><center>&copy; COPYRIGHT 2010 STMicroelectronics</center></h2>
  ******************************************************************************
  */ 
  
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MOTIONAPP_H__
#define __MOTIONAPP_H__

/* Includes ------------------------------------------------------------------*/

/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Starting sampling rate. */
#define DEFAULT_MPU_HZ  (20)

/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */

void gyro_data_ready_cb(void);

#ifdef INVENSENSE_MPL_VER

typedef struct{
	uint8_t quaternion_accuracy;
	uint32_t quaternion_timestamp;
	int32_t quaternion[4];
	uint8_t euler_accuracy;
	uint32_t euler_timestamp;
	int32_t euler[3];
	uint8_t accel_accuracy;
	uint32_t accel_timestamp;
	int32_t accel[3];
	uint8_t gyro_accuracy;
	uint32_t gyro_timestamp;
	int32_t gyro[3];
	uint8_t compass_accuracy;
	uint32_t compass_timestamp;
	int32_t compass[3];

}INVENSENSE_RAW_DATA_T;

int32_t invensense_hw_init(void);
int32_t motion_read(INVENSENSE_RAW_DATA_T *pdata);
#endif

#endif /* __MOTIONAPP_H__ */

/******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
